package org.example.service;

import org.springframework.web.multipart.MultipartFile;

import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * 投资数据Excel导入导出服务接口
 */
public interface InvestmentDataExcelService {
    
    /**
     * 导入Excel文件
     * @param file Excel文件
     * @return 导入成功的数据数量
     * @throws IOException IO异常
     */
    int importExcel(MultipartFile file) throws IOException;
    
    /**
     * 导出Excel文件
     * @param response HTTP响应
     * @throws IOException IO异常
     */
    void exportExcel(HttpServletResponse response) throws IOException;
    
    /**
     * 根据放款月范围导出Excel文件
     * @param startPeriod 开始放款月
     * @param endPeriod 结束放款月
     * @param response HTTP响应
     * @throws IOException IO异常
     */
    void exportExcelByPeriodRange(String startPeriod, String endPeriod, HttpServletResponse response) throws IOException;
    
    /**
     * 根据放款月导出Excel文件
     * @param periodDate 放款月
     * @param response HTTP响应
     * @throws IOException IO异常
     */
    void exportExcelByPeriod(String periodDate, HttpServletResponse response) throws IOException;
}
